﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>类别管理</title>
    <meta charset="UTF-8"/>
    <link th:href="@{/css/shop.css}" type="text/css" rel="stylesheet" />
    <link th:href="@{/css/Sellerber.css}" type="text/css"  rel="stylesheet" />
    <link th:href="@{/css/bkg_ui.css}" type="text/css"  rel="stylesheet" />
    <link th:href="@{/font/css/font-awesome.min.css}"  rel="stylesheet" type="text/css" />
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet" type="text/css" />
    <link th:href="@{/css/BackgroudCss/cityManage.css}" rel="stylesheet" type="text/css" />

    <script th:src="@{/js/jquery-1.9.1.min.js}" type="text/javascript" ></script>
    <script th:src="@{/js/Validform/Validform.min.js}" type="text/javascript"></script>
    <script th:src="@{/js/jquery.cookie.js}" type="text/javascript"></script>
    <script th:src="@{/js/shopFrame.js}" type="text/javascript"></script>
    <script th:src="@{/js/Sellerber.js}" type="text/javascript"></script>

    <script th:src="@{/layui/layui.js}" type="text/javascript"></script>
    <script th:src="@{/js/layer/layer.js}" type="text/javascript"></script>

    <script type="text/javascript" th:src="@{/js/Backgroundjs/typeManage.js}"></script>
</head>
<!--<div id="ha" th:text="${alertTrue}"></div>
<div id="he" th:text="${alertFalse}"></div>-->
<body>
<!-- 左侧 -->
<div class="layui-nav-tree layui-nav-side">
    <ul class="layui-nav layui-nav-tree layui-nav-side">
        <li class="layui-nav-item provinceShow" th:each="left :${left}">
            <a th:text="${left.getTypeName()}" href="javascript:;"></a><span th:text="${left.getShowTypeId()}" class='hideSpan'></span>
        </li>
    </ul>
</div>
<!-- 添加类别按钮 -->
<div class="margin Competence_style" id="page_style">
    <div class="operation clearfix">
        <a href="javascript:void(0)" id="city_add"  class="btn button_btn bg-deep-blue"><i class="fa  fa-edit"></i>&nbsp;添加类别</a>
    </div>
</div>
<!-- 添加类别操作-->
<div id="add" class=" add_administrator" style="display:none">
    <div class="add_style add_administrator_style">
        <form method="post" id="form-city-add" th:action="add">
            <ul>
                <li class="clearfix">
                    <label class="label_name col-xs-2 col-lg-2"><i>*</i>类别名称：</label>
                    <div class="formControls col-xs-6">
                        <input type="text" class="input-text col-xs-12" value="" placeholder="" name="typeName" datatype="*2-16" nullmsg="类别名称不能为空"></div>
                    <div class="col-4"> <span class="Validform_checktip"></span></div>
                </li>
                <li class="clearfix">
                    <div class="form-group">
                        <label class="label_name col-xs-2 col-lg-2"><i>*</i>类别ID：</label>
                        <div class="col-sm-3">
                            <select name="fatherId" id="fatherType">
                            </select>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="form-group">
                        <div class="clearfix col-xs-12 col-lg-12 align">
                            <input class="btn button_btn bg-deep-blue btn_height" type="submit" value="提交添加">
                            <input name="reset" type="reset" class="btn button_btn btn-infobtn-gray btn_height" value="取消重置" />
                        </div>
                    </div>
                    <div class="col-4"> <span class="Validform_checktip"></span></div>
                </li>
            </ul>
        </form>
    </div>
</div>
<!-- 右侧 -->
<div class="compete_list">
    <table id="sample_table" class="table table_list table_striped table-bordered dataTable no-footer">
        <thead>
        <tr id="tr">
            <th>类别ID</th>
            <th>类别名称</th>
            <th>父级ID</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
            <tr th:each="showtype:${right.content}">
                <td th:text="${showtype.showTypeId}"></td>
                <td th:text="${showtype.typeName}"></td>
                <td  th:text="${showtype.fatherId}"></td>
                <!--<td><a th:href="@{/showtype/delete(id=${showtype.showTypeId})}"  id="del1"  href='javascript:;' title='删除' class='btn btn-xs btn-danger' >删除</a></td>-->
                <td><a th:onclick="'javascript:del('+${showtype.showTypeId}+','+${showtype.fatherId}+')'" id='del' href='javascript:;' title='删除'  class='btn btn-xs btn-danger'> 删除 </a></td>
            </tr>
        </tbody>
    </table>
    <input type="hidden" id="number" th:value="${right.number}"/>
    <input type="hidden" id="totalElements" th:value="${right.totalElements}"/>
    <div id="demo1"></div>
</div>
</body>

</html>